package com.hoshiicloud.as2c.minipro.feign.hystrix;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hoshiicloud.as2c.minipro.dto.*;
import com.hoshiicloud.as2c.minipro.feign.UserService;
import com.hoshiicloud.as2c.minipro.param.MemberAddressPageParam;
import com.hoshiicloud.as2c.minipro.param.MemberAddressUpdateParam;
import com.hoshiicloud.as2c.minipro.param.PlatStoreQueryParam;
import com.hoshiicloud.common.rpc.Response;
import org.springframework.stereotype.Component;

import javax.validation.Valid;
import java.util.List;
import java.util.Map;

/**
 * @author yangcheng
 * @version 1.0
 * @title: HystrixUserCenterFeignFallback
 * @description: 用户中心微服务FeignClient熔断器
 * @date 2019/5/28 16:26
 * @mail maiboyc@163.com
 */
@Component
public class HystrixUserFeignFallback implements UserService {

	/**
	 * 根据id获取平台会员
	 *
	 * @param id ID
	 * @return Response
	 */
	@Override
	public Response<ConsumerDto> getById(Long id) {
		return null;
	}

	/**
	 * 根据参数查询平台会员信息
	 *
	 * @param entity 查询参数实体
	 * @return Response<List < ConsumerDto>>
	 */
	@Override
	public Response getConsumers(ConsumerDto entity) {
		return Response.failed("查询平台会员信息失败");
	}

	/**
	 * 保存平台会员信息
	 *
	 * @param entity 保存对象
	 * @return Response<Long>
	 */
	@Override
	public Response saveConsumer(ConsumerDto entity) {
		return Response.failed("保存平台会员信息失败");
	}

	/**
	 * 保存平台会员账户
	 *
	 * @param entity 保存对象
	 * @return Response<Long>
	 */
	@Override
	public Response saveMemberAccount(MemberAccountDto entity) {
		return Response.failed("保存会员账户信息失败");
	}

	/**
	 * 保存会员收货地址
	 *
	 * @param entity 会员收货地址实体
	 * @return Response<Long>
	 */
	@Override
	public Response<Long> addAddress(MemberAddressDto entity) {
		return null;
	}

	/**
	 * 修改会员收货地址
	 *
	 * @param entity 会员收货地址修改参数实体
	 * @return Response<Long>
	 */
	@Override
	public Response<Long> updateAddress(MemberAddressUpdateParam entity) {
		return null;
	}

	/**
	 * 删除会员收货地址
	 *
	 * @param id 收货地址ID
	 * @return Response<Long>
	 */
	@Override
	public Response<Long> deleteAddress(Long id) {
		return null;
	}

	/**
	 * 查看会员收货地址
	 *
	 * @param entity 查询参数实体
	 * @return Response<Page < MemberAddressDto>>
	 */
	@Override
	public Response<Page<MemberAddressDto>> viewAddress(MemberAddressPageParam entity) {
		return Response.failed("分页查询收货地址信息失败");
	}

	/**
	 * 根据ID获取收货地址信息
	 *
	 * @param id 收货地址ID
	 * @return Response<MemberAddressDto>
	 */
	@Override
	public Response<MemberAddressDto> getAddressById(Long id) {
		return Response.failed("查询收货地址信息失败");
	}


	@Override
	public Response<Page<Map<String, Object>>> StoreRangeCalculation(@Valid StoreRangeCalculationDTO param) {
		return Response.failed("根据经纬度查询店铺列表失败");
	}

	@Override
	public Response<PlatStoreDTO> queryById(Long id) {
		return Response.failed("根据id查询店铺详情失败");
	}

	@Override
	public Response save(PlatStoreAddParamDTO platStoreAddParamDTO) {
		return Response.failed("新增店铺失败");
	}

	/**
	 * 根据店铺ID获取店铺经营类目
	 *
	 * @param storeId 店铺id
	 * @return Response<List < Map < String, Object>>>
	 */
	@Override
	public Response<List<Map<String, Object>>> getCategoriesByStoreId(Long storeId) {
		return Response.failed("根据店铺ID获取店铺经营类目");
	}

	@Override
	public Response<Page<PlatStoreDTO>> page(PlatStoreQueryParam param) {
		return Response.failed("分页查询店铺信息失败");
	}

	/**
	 * 根据id获取租户
	 *
	 * @param id ID
	 * @return Response
	 */
	@Override
	public Response getByCompanyId(Long id) {
		return Response.failed("根据id查询租户信息失败");
	}

	/**
	 * 根据租户会员ID获取租户会员信息
	 *
	 * @param id 租户会员ID
	 * @return Response
	 */
	@Override
	public Response getMemberById(Long id) {
		return Response.failed("根据租户会员ID获取租户会员信息失败");
	}

	/**
	 * 保存租户会员信息
	 *
	 * @param memberDto 租户会员信息DTO
	 * @return Response
	 */
	@Override
	public Response saveMember(MemberDto memberDto) {
		return Response.failed("保存租户会员信息失败");
	}

	/**
	 * 更新租户会员信息
	 *
	 * @param memberDto 租户会员信息DTO
	 * @return Response
	 */
	@Override
	public Response updateMember(MemberDto memberDto) {
		return Response.failed("更新租户会员信息失败");
	}

	/**
	 * 根据wxOpenId查询租户会员信息
	 *
	 * @param wxOpenId 微信用户唯一id
	 * @return Response
	 */
	@Override
	public Response getMemberByWxOpenId(String wxOpenId) {
		return Response.failed("根据wxOpenId查询租户会员信息失败");
	}

	/**
	 * 根据手机号码查询租户会员
	 *
	 * @param mobile 手机号码
	 * @return Response
	 */
	@Override
	public Response<MemberDto> getMemberByMobile(Long companyId,String mobile) {
		return Response.failed("根据手机号码查询租户会员信息失败");
	}

	/**
	 * 根据微信openId和手机号码获取租户会员信息
	 *
	 * @param wxOpenId 微信openId
	 * @param mobile   手机号码
	 * @return Response<MemberDto>
	 */
	@Override
	public Response<MemberDto> getMemberByWxOpenIdOrMobile(String wxOpenId, String mobile) {
		return Response.failed("根据微信openId和手机号码获取租户会员信息失败");
	}

	/**
	 * 查询租户会员信息和平台会员信息
	 *
	 * @param param 查询参数
	 * @return Response<Map < String, Object>>
	 */
	@Override
	public Response<Map<String, Object>> getMemberWithConsumerInfo(Map<String, Object> param) {
		return Response.failed("没有查询到租户会员信息和平台会员信息");
	}

	/**
	 * 根据参数查找租户会员信息
	 *
	 * @param param 查询参数
	 * @return Response<List < MemberDto>>
	 */
	@Override
	public Response<List<MemberDto>> getMembers(MemberDto param) {
		return Response.failed("没有查询到租户会员信息");
	}
}
